<script lang="ts" setup>
//query=>封装hooks-useRoutes仅此而已
import{useRoute} from 'vue-router'
import{toRefs} from 'vue'
const route = useRoute()

    let{query}=toRefs(route)
    console.log(query);

</script>
<template>
    <div>
        <h3>新闻id:{{ query.id }}</h3>
        <h3>新闻title:{{ query.title }}</h3>
        <h3>新闻content:{{ query.content }}</h3>
    </div>
</template>